import { paramsToProps, AppRouteRecordRaw } from '@fssc/admin';

const Layout = () => import('@/layout/index.vue');

export default [
  {
    path: '/one-menu',
    component: Layout,
    meta: {
      title: 'OneMenu',
    },
    name: 'OneMenu',
    children: [
      {
        path: 'test-one',
        name: 'TestOne',
        component: () => import('@/views/one-menu/TestOne.vue'),
        meta: {
          title: 'TestOne',
          affix: true
        },
        props: paramsToProps,
      },
      {
        path: 'test-two',
        name: 'TestTwo',
        component: () => import('@/views/one-menu/TestTwo.vue'),
        meta: {
          title: 'TestTwo',
        },
      },
    ],
  },
  {
    path: '/one-menu-xx',
    component: Layout,
    meta: {
      title: 'OneMenuXX',
    },
    name: 'OneMenuXX',
    children: [
      {
        path: 'parent-show',
        name: 'ParentShow',
        component: '',
        meta: {
          title: 'ParentShow',
          hidden: false,
        },
        children: [
          {
            path: 'test-one-show',
            name: 'TestOneShow',
            component: () => import('@/views/one-menu/TestOne.vue'),
            meta: {
              title: 'TestOneShow',
            },
            props: paramsToProps,
          },
          {
            path: 'test-two-show',
            name: 'TestTwoShow',
            component: () => import('@/views/one-menu/TestTwo.vue'),
            meta: {
              title: 'TestTwoShow',
            },
          },
        ],
      },
      {
        path: 'parent-hidden',
        name: 'ParentHidden',
        component: '',
        meta: {
          title: 'ParentHidden',
          hidden: true,
        },
        children: [
          {
            path: 'test-one-hidden',
            name: 'TestOneHidden',
            component: () => import('@/views/one-menu/TestOne.vue'),
            meta: {
              title: 'TestOneHidden',
            },
            props: paramsToProps,
          },
          {
            path: 'test-two-hidden',
            name: 'TestTwoHidden',
            component: () => import('@/views/one-menu/TestTwo.vue'),
            meta: {
              title: 'TestTwoHidden',
              hidden: true,
            },
          },
        ],
      },
    ],
  },
] as unknown as AppRouteRecordRaw[];
